package com.gmcc.docmanager.download;

public class T {
    private static T instance = null;

    private long mTime;
    private long mT;

    private T(long t) {
	mT = t;
	mTime = System.currentTimeMillis();
    }

    public static T getInstance() {
	if (instance == null) {
	    instance = new T(3000);
	}
	return instance;
    }

    public void updataTime() {
	mTime = System.currentTimeMillis();
    }

    public boolean mark() {
	// AspLog.d("OVALTIME", "*********************************");
	// AspLog.d("OVALTIME", "preTime:" + mTime);

	long time = System.currentTimeMillis();
	// AspLog.d("OVALTIME", "curTime:" + time);

	boolean ret = false;

	if (time - mTime >= mT) {
	    ret = true;
	    mTime = time;
	}
	// AspLog.d("OVALTIME", "mark:" + ret);
	// AspLog.d("OVALTIME", "*********************************");

	return ret;
    }
}
